define(["jquery","underscore", "marionette", "vent"], function(\$, _, Marionette, vent) {

	var ${capDomainClass}ModelView = Marionette.ItemView.extend({
		
			tagName : 'tr',
			template : _.template(\$('#tpl-${domainClass}-row').html()),
			
			initialize: function(){
				
				var that = this;
				
				vent.on("setActive${capDomainClass}", function(model) {
					if(that.model === model){
						that.setActive();
					}
				});
			},
			
			ui : {
			
			}, 
			
			events : {
				'click':'setActive',
			},

			modelEvents : {
				'change' : "modelChanged"
			},
		
			modelChanged : function() {

				this.render();
			},

			setActive : function() {
				this.\$el.parent().find('tr').removeClass('info');
				this.\$el.addClass('info');
				
				vent.trigger('show${capDomainClass}Details', this.model);
			}

		});
		
	return ${capDomainClass}ModelView;
});